package reflect;

import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;

public class Test {
    public static void main(String[] args) throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException, ClassNotFoundException {
        Class cls = Class.forName("reflect.Student");
        Constructor c = cls.getConstructor(String.class,int.class,char.class);
        Object o = c.newInstance("李四",22,'女');
        System.out.println(o);
    }
}
